{extend name="public/base"/}
{block name="style"}
{/block}
{block name="body"}
<script type="text/javascript" src="/public/lboyue/m/sitejs/book.js?v=20181123"></script>
<script type="text/javascript">

    $(document).ready(function () {


        $('.moreIco').click(function () {

            if($(this).hasClass('closeIco')){

                $('#header').removeClass('app_headerFixed2');
                $(this).removeClass('closeIco');
                $('.app_header_second').hide();
                $('.app_meskSection').hide();

            }else{

                $('#header').addClass('app_headerFixed2');
                $(this).addClass('closeIco');
                $('.app_header_second').show();
                $('.app_meskSection').show();
            }



        })

        $('body').on('click','.app_meskSection',function () {
            $('.app_header_second').hide();
            $('.app_meskSection').hide();
            $('#header').removeClass('app_headerFixed2');
            $('.moreIco').removeClass('closeIco');
        })
    })

</script>
<div class="app_goBackToTop"></div>
<div class="app_meskSection"></div>

<div class="container">

    <div class="app_header_section2  app_scrollerHeader" id="header">
        <div class="app_header_detail2">
            <div class="app_header_back"></div>
            <div class="app_header_h1">
                个人资料                <a href="/personal/bookcase"> <i class="shujiaIco"></i></a>
                <i class="moreIco"></i>
            </div>
        </div>
		{include file="public/dropnav" /}
		   </div>



    <div class="app_body">
        
    <div class="app_wanJiPassWord">

        <div class="app_lisBlockSpan3 ">
            <ul>
				<li>
                    <span class="left">昵称：</span>
                    <input id="nickname" type="text" value="{$nickname}" placeholder="必填，请输入昵称" />
                    <span id="nicknametip" class="tips wrong"></span>
                </li>
                <li>
                    <span class="left">手机号：</span>
                    <input id="userphone" type="text" value="{$mobile}" placeholder="必填，请输入手机号" />
                    <span id="userphonetip" class="tips wrong"></span>
                </li>
                <li class="code">
                    <span class="left">验证码：</span>
                    <input id="verifycode" type="text" value="" placeholder="请输入验证码" />
                    <span id="verifycodetip" class="tips true"></span>
                    <button class="codeBtn">获取验证码</button>
                </li>
                <li>
                    <span class="left">密码：</span>
                    <input id="userpass" type="password" value="" placeholder="选填，需修改密码时填写" />
                    <span id="userpasstip" class="tips  true"></span>
                </li>
            </ul>
        </div>
        <div id="errtip" class="app_wrongBlock" style="display: none;">选填，修改时填写</div>
        <div class="app_listBlockButton app_marginStyle1" style="padding-bottom: 1.5rem"><button id="submitbtn">确认</button></div>

    </div>
    {block name="include"}{include file="public:footer" /}{/block}
    </div>
</div>



{/block}
{block name="script"}
    <script type="text/javascript" src="/public/lboyue/m/sitejs/user.js"></script>

    <script type="text/javascript">
        var uid=14770;
        var reurl="/personal/info";
        $(document).ready(function () {


            bindverify($(".codeBtn"),$("#userphone"),3,uid);

            inputcheck($("#userphone"),reg_phone,null,function(){
                $("#userphonetip").removeClass("wrong").addClass("true").show();
                $("#errtip").hide();
            },function(){
                $("#userphonetip").removeClass("true").addClass("wrong").show();
                $("#errtip").html("手机号格式不对，请重新输入").show();
            });
            inputcheck($("#verifycode"),reg_verify,null,function(){
                $("#verifycodetip").removeClass("wrong").addClass("true").show();
                $("#errtip").hide();
            },function(){
                $("#verifycodetip").removeClass("true").addClass("wrong").show();
                $("#errtip").html("密码格式不对，请重新输入").show();
            });
            inputcheck($("#userpass"),reg_pass,null,function(){
                $("#userpasstip").removeClass("wrong").addClass("true").show();
                $("#errtip").hide();
            },function(){
                $("#userpasstip").removeClass("true").addClass("wrong").show();
                $("#errtip").html("密码格式不对，请重新输入").show();
            });

            $("#submitbtn").click(function () {
                var nickname=$("#nickname").val();
                var phone = $("#userphone").val();
                var verifycode = $("#verifycode").val();
                var userpass = $("#userpass").val();

                useredit(uid,nickname,phone,verifycode,userpass,reurl);
            });

        });
    </script>
{/block}


